/**
 * Copyright (C), 2015, 上海赛可电子商务有限公司
 * Author:   张卫明
 * Date:     2015-4-28
 * lever:    page
 * Description: 首页js
 */

;(function($,window) {
	$(document).on("click",".brandClickEvent",function(){
		//alert($(this).attr("brandId"));
		if(!$(this).hasClass("filter-selected")){
			$.ajax({
				url:"/specialList/brandsList.htm",
				type:'POST',
				dataType:'html',
				data:{
					velBrandId:$(this).attr("brandId"),
					channelId:channelId
				},
				success:function(response){
					$('#cooperation_Screen').html(response);
				},
				error:function(errorMessage){

				}
			});
		}
		
	});
	
	$(document).on("click",".seriesClickEvent",function(){
		//alert($(this).attr("brandId"));
		//自身点击不触发ajax
		if(!$(this).hasClass("filter-selected")){
			var oCn = $(this).parent(".filter-box"),
				oAs = oCn.find("a");

			oAs.each(function(){
				$(this).removeClass("filter-selected");
			});
			$(this).addClass("filter-selected");
			$.ajax({
				url:"/specialList/seriesList.htm",
				type:'POST',
				dataType:'html',
				data:{
					velBrandId:$(this).attr("brandId"),
					velSeriesId:$(this).attr("seriesId"),
					channelId:channelId,
					cityId:CNPC_CityId
				},
				success:function(response){
					$('#cooperation_spulist').html(response);
				},
				error:function(errorMessage){

				}
			});
		}
		
	});
	
})(jQuery,window);

